package org.macpro.alone.server.util;

/**
 * �ַ���֤�����
 * 
 * @author WangDong
 * @date Mar 14, 2010
 * 
 */
public class ValidateTool {

	/**
	 * @param flag
	 *            �ַ�
	 * @return �Ƿ�Ϊ�� true/false
	 */
	static public boolean isNotNull(String flag) {
		if (flag == null || flag.equals(""))
			return false;
		else
			return true;
	}

	/**
	 * @param flag
	 *            �ַ�
	 * @return �Ƿ����� true/false
	 */
	static public boolean isNumber(String flag) {
		try {
			Float.valueOf(flag);
			return true;
		} catch (Exception e) {
			// TODO: handle exception
			return false;
		}

	}
	static public boolean isNotTreeRoot(String flag){
		if (flag == null || flag.equals("")||flag.equals("1"))
			return false;
		else
			return true;
	}
}
